<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
<form name="infoForm" method="get" action="/info" target="_blank">
	<p>用户名：<input type="text" name="userName"></p>
	<p>
		性别：<input type="radio" checked value="1" name="sex">男
		<input type="radio" value="2" name="sex">女
	</p>
	<p>是否已婚：
		<select name="isJieHun">
			<option value="0">请选择</option>
			<option value="1">是</option>
			<option value="2">否</option>
		</select>
	</p>
	<p>爱好：
		<input type="checkbox" name="hobby" value="1">学习
		<input type="checkbox" name="hobby" value="2">游戏
		<input type="checkbox" name="hobby" value="3">下棋
		<input type="checkbox" name="hobby" value="4">游泳
		<input type="checkbox" name="hobby" value="5">钓鱼
	</p>
	<button>提交1</button>
	<input type="submit" value="提交2">
	<input type="button" value="提交3">
</form>
<script>
	const btn = document.querySelector("input[type=button]");
	btn.onclick = function(){
		// document.querySelector("form").submit();
		document.infoForm.submit();
		// console.log(document.infoForm.userName.value)
	}
	
</script>
</body>
</html>